﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EasyTrader.Signal
{
    public class ForecastingInfo
    {
        public int StartX = -1;
        public int EndX = -1;
        public double StartY = -1.0;
        public double EndY = -1.0;
        public double ErrorStartHighY = -1.0;
        public double ErrorEndHighY = -1.0;
        public double ErrorStartLowY = -1.0;
        public double ErrorEndLowY = -1.0;
        public double Angle = 0.0;
        public double PureStartY = 0.0;
        public double PureEndY = 0.0;
        public int Len()
        {
            return Math.Abs(EndX - StartX);
        }

        public double Height()
        {
            return Math.Abs(EndY - StartY);
        }

        public int Slope()
        {
            double deltaY = EndY - StartY;
            if (deltaY > 0)
                return GlobalVar.PriceUp;
            else if (deltaY < 0)
                return GlobalVar.PriceDown;
            else
                return GlobalVar.PriceFlat;
        }
    }
}
